package com.etc.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.etc.entity.City;
import com.etc.service.CityService;

@Controller
@RequestMapping(value="city")
public class CityController {
	@Resource
	private CityService cityService;
	
	//根据省份ID查询该省份的所有城市
	@RequestMapping(value="findcitybyproid")
	@ResponseBody
	public List<City> findCityByProId(int pid){
		//System.out.println("pid:"+pid);
		return cityService.findCityByPid(pid);
	}

}
